import {
  defineStore
} from 'pinia'

export const useStore = defineStore('storeId', {
  // id: 'user',
  state: () => {
    return {
      counter: 0,
      token: '',
      name: 'pinia',
      arr: ['a', 'b', 'c'],
      useTypes: '',
      isCollapse:null
    }
  },
  getters: {},
  actions: {
    getUserToken(val) {
      this.token = val;
    },
    duckUse(val) {
      this.useTypes = val;
    }

  },

  persist: {
    enabled: true,
    strategies: [{
      key: 'token',
      storage: sessionStorage,
      paths: ['token']
    }]
  }

})